package us.wili.dev.client.model.rsp;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import us.wili.dev.common.model.IdLongToStrSerializer;
import us.wili.dev.model.entity.Goods;

import java.math.BigDecimal;
import java.util.List;

public class GoodsRsp {
    @ApiModelProperty(value="ID")
    @JSONField(serializeUsing = IdLongToStrSerializer.class)
    private Long ID;

    @ApiModelProperty(value="商品名称")
    private String goods_name;

    @ApiModelProperty(value="商品主图")
    private String goods_pic;

    @ApiModelProperty(value="起订价")
    private BigDecimal goods_price;

    @ApiModelProperty(value="商品大货")
    private String goods_big;

    @ApiModelProperty(value="商品货号")
    private String goods_cargo;

    @ApiModelProperty(value="商品编号")
    private String goods_number;

    @ApiModelProperty(value="商品颜色")
    private Integer goods_color;

    @ApiModelProperty(value="商品宽幅")
    private String goodsWide;

    @ApiModelProperty(value="商品季节")
    private String goodsSeason;

    @ApiModelProperty(value="商品克重")
    private String goodsG;

    @ApiModelProperty(value="商品用途")
    private String goodsUse;

    @ApiModelProperty(value="商品面料")
    private String goodsMaterial;

    @ApiModelProperty(value="商品详情")
    private String goods_deta;

    @ApiModelProperty(value="商品轮播图")
    private String goods_images;

    @ApiModelProperty(value="商品推荐")
    private List<Goods> goods_hot;

    public static GoodsRsp Initialization(Goods goods,List<Goods> goods_hot){
        GoodsRsp rsp =new GoodsRsp();
        rsp.setGoods_name(goods.getGoodsName());
        rsp.setGoods_pic(goods.getGoodsPic());
        rsp.setGoods_price(goods.getGoodsPrice());
        rsp.setGoods_big(goods.getGoodsBig());
        rsp.setGoods_cargo(goods.getGoodsCargo());
        rsp.setGoods_number(goods.getGoodsNumber().toString());
        rsp.setGoods_color(goods.getGoodsColor());
        rsp.setGoodsWide(goods.getGoodsWide());
        rsp.setGoodsSeason(goods.getGoodsSeason());
        rsp.setGoodsG(goods.getGoodsG());
        rsp.setGoodsUse(goods.getGoodsUse());
        rsp.setGoodsMaterial(goods.getGoodsMaterial().toString());
        rsp.setGoods_deta(goods.getGoodsDeta());
        rsp.setGoods_images(goods.getGoodsImages());
        rsp.setGoods_hot(goods_hot);
        return rsp;
    }

    public static GoodsRsp hot(Goods goods){
        GoodsRsp rsp =new GoodsRsp();
        rsp.setID(goods.getId());
        rsp.setGoods_name(goods.getGoodsName());
        rsp.setGoods_pic(goods.getGoodsPic());
        rsp.setGoods_price(goods.getGoodsPrice());
        return rsp;
    }

    public static GoodsRsp classfabric(Goods goods){
        GoodsRsp rsp =new GoodsRsp();
        rsp.setID(goods.getId());
        rsp.setGoods_name(goods.getGoodsName());
        rsp.setGoods_pic(goods.getGoodsPic());
        rsp.setGoods_price(goods.getGoodsPrice());
        return rsp;
    }

    public static GoodsRsp search(Goods goods){
        GoodsRsp rsp =new GoodsRsp();
        rsp.setID(goods.getId());
        rsp.setGoods_name(goods.getGoodsName());
        rsp.setGoods_pic(goods.getGoodsPic());
        rsp.setGoods_price(goods.getGoodsPrice());
        return rsp;
    }

    public List<Goods> getGoods_hot() {
        return goods_hot;
    }

    public void setGoods_hot(List<Goods> goods_hot) {
        this.goods_hot = goods_hot;
    }

    public BigDecimal getGoods_price() {
        return goods_price;
    }

    public void setGoods_price(BigDecimal goods_price) {
        this.goods_price = goods_price;
    }

    public String getGoods_big() {
        return goods_big;
    }

    public void setGoods_big(String goods_big) {
        this.goods_big = goods_big;
    }

    public String getGoods_cargo() {
        return goods_cargo;
    }

    public void setGoods_cargo(String goods_cargo) {
        this.goods_cargo = goods_cargo;
    }

    public String getGoods_number() {
        return goods_number;
    }

    public void setGoods_number(String goods_number) {
        this.goods_number = goods_number;
    }

    public Integer getGoods_color() {
        return goods_color;
    }

    public void setGoods_color(Integer goods_color) {
        this.goods_color = goods_color;
    }

    public Long getID() {
        return ID;
    }

    public void setID(Long ID) {
        this.ID = ID;
    }

    public String getGoods_name() {
        return goods_name;
    }

    public void setGoods_name(String goods_name) {
        this.goods_name = goods_name;
    }

    public String getGoods_pic() {
        return goods_pic;
    }

    public void setGoods_pic(String goods_pic) {
        this.goods_pic = goods_pic;
    }

    public String getGoodsWide() {
        return goodsWide;
    }

    public void setGoodsWide(String goodsWide) {
        this.goodsWide = goodsWide;
    }

    public String getGoodsSeason() {
        return goodsSeason;
    }

    public void setGoodsSeason(String goodsSeason) {
        this.goodsSeason = goodsSeason;
    }

    public String getGoodsG() {
        return goodsG;
    }

    public void setGoodsG(String goodsG) {
        this.goodsG = goodsG;
    }

    public String getGoodsUse() {
        return goodsUse;
    }

    public void setGoodsUse(String goodsUse) {
        this.goodsUse = goodsUse;
    }

    public String getGoodsMaterial() {
        return goodsMaterial;
    }

    public void setGoodsMaterial(String goodsMaterial) {
        this.goodsMaterial = goodsMaterial;
    }

    public String getGoods_deta() {
        return goods_deta;
    }

    public void setGoods_deta(String goods_deta) {
        this.goods_deta = goods_deta;
    }

    public String getGoods_images() {
        return goods_images;
    }

    public void setGoods_images(String goods_images) {
        this.goods_images = goods_images;
    }
}
